<?php
require_once('Zend/Pdf.php');

class Gorilla_Pdf extends Zend_Pdf {
    protected $_activePage = false;
    protected $_pageSize = Zend_Pdf_Page::SIZE_LETTER;
    protected $_font = false;

    public function __construct($source = null, $revision = null, $load = null) {
        $this->_font = Zend_Pdf_Font::fontWithName(Zend_Pdf_Font::FONT_COURIER);
        parent::__construct($source, $revision, $load);
    }

    public function newLine() {
        return $this;
    }

    /**
     * Sets the page size of the next page created. Any pages before it will not
     * be set to the size.
     * @param Zend_Pdf_Page::constants $pageSize
     */
    public function setPageSize($pageSize) {
        $this->_pageSize = $pageSize;
    }

    public function setFont($font, $size) {
        $this->_font = Zend_Pdf_Font::fontWithName($font);
        $this->_activePage->setFont($this->_font, $size);
    }

    /**
     * Returns the current page the pdf is using to processing
     * @return Zend_Pdf_Page
     */
    public function getActivePage() {
        if($this->_activePage === false && empty($this->pages)) {
            $this->newPage();
            $this->_activePage = &end($this->pages);
        }
        return $this->_activePage;
    }

    public function newPage() {
        require_once 'Gorilla/Pdf/Page.php';
        $this->pages []= new Gorilla_Pdf_Page($this->_pageSize);
        return $this;
    }

    /**
     * Add $x pixels to the current x-axis position
     * @param int $x
     * @return Gorilla_Pdf
     */
    public function addX($x) {
        return $this;
    }

    /**
     * Add $y pixels to the current y-axis position
     * @param int $y
     * @return Gorilla_Pdf
     */
    public function addY($y) {
        return $this;
    }

    public function drawText($text) {
        return $this;
    }

    public function drawHline($x) {
        return $this;
    }

    public function setLineHeight($pixels) {
        return $this;
    }
    
    public function setX($x) {
        return $this;
    }

    public function setY($y) {
        return $this;
    }

    public function setAlign($align) {
        return $this;
    }

    public function setWrap($width) {
        return $this;
    }

    public function setHeader($header) {
        return $this;
    }

    public function setFooter($footer) {
        return $this;
    }
}

?>
